(find-tag-noselect): Save the value of
authorGerd Moellmann <gerd@gnu.org>
Mon, 15 Jan 2001 16:37:27 +0000 (16:37 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 15 Jan 2001 16:37:27 +0000 (16:37 +0000)
tags-file-name before switching buffers, for the case it has a
buffer-local value.

lisp/progmodes/etags.el

index e01a1448af874c559bfddfd677c85be9795bab02..131610e09d734e2c1207874162670909541f6ace 100644 (file)
@@ -820,9 +820,11 @@ See documentation of variable `tags-file-name'."
   (interactive (find-tag-interactive "Find tag: "))
 
   (setq find-tag-history (cons tagname find-tag-history))
-  ;; Save the current buffer's value of `find-tag-hook' before selecting the
-  ;; tags table buffer.
-  (let ((local-find-tag-hook find-tag-hook))
+  ;; Save the current buffer's value of `find-tag-hook' before
+  ;; selecting the tags table buffer.  For the same reason, save value
+  ;; of `tags-file-name' in case it has a buffer-local value.
+  (let ((local-find-tag-hook find-tag-hook)
+       (tags-file-name tags-file-name))
     (if (eq '- next-p)
        ;; Pop back to a previous location.
        (if (ring-empty-p tags-location-ring)